#pragma once

#include "../umlmodel_global.h"

#include <memory>
#include <vector>

#include "VariableAction.h"

using std::make_shared;
using std::shared_ptr;
using std::vector;

namespace uml {
class OutputPin;

/// <summary>
/// ReadVariableAction
/// A ReadVariableAction is a VariableAction that retrieves the values of a
/// Variable.
/// </summary>
class UMLMODEL_EXPORT ReadVariableAction : public VariableAction {

public: // Constructors and destructors
    explicit ReadVariableAction(const QString& umlType="uml::ReadVariableAction");

public: // JsonSerializable override
    void fromJson(const QJsonObject& json, QStringList& errorList) override;
    void toJson(QJsonObject& json) override;

public: // Properties
    /// <summary>
    /// result getter
    /// The OutputPin on which the result values are placed.
    /// </summary>
    shared_ptr<OutputPin> result() const;

    /// <summary>
    /// result setter
    /// The OutputPin on which the result values are placed.
    /// </summary>
    void setResult(shared_ptr<OutputPin> value);

private: // Fields
    /// <summary>
    /// result
    /// The OutputPin on which the result values are placed.
    /// </summary>
    shared_ptr<OutputPin> result_;

};

} // namespace uml
